<?php
defined('_JEXEC') or die('Restricted access');

/**
 * @package             Joomla
 * @subpackage          Celta Web Traffic Component
 * @author              Steven Palmer
 * @author url          http://celtaweb.net
 * @author email        support@celtaweb.net
 * @license             GNU/GPL, see /files/en-GB.license.txt
 * @copyright           Copyright (c) 2012 Steven Palmer All rights reserved.
 * @version             Version 0.0.1 March 2012
 *
 * Celta Web Traffic is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

jimport('joomla.application.component.model');
JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');

class CeltawebticketsModelControlpanel extends JModel {

//    function getLatestEntries()
//    {
//        return 0;
//    }

//    function latestEntries( $count = 10)
//    {
//        $db = & JFactory::getDBO();
//
//        $query = "SELECT a.*, u.name as `username`, ca.name as `category`, DATE_FORMAT( a.date_created, \"%D %M %Y\") AS entrydate "
//         . " FROM ".$db->nameQuote('#__simplelisting')." as a "
//         . " LEFT JOIN ".$db->nameQuote('#__simplelisting_categories')." AS ca ON ".$db->nameQuote('ca.id')."=".$db->nameQuote('a.category_id ')
//         . " LEFT JOIN ".$db->nameQuote('#__users')." AS u ON u.id = a.create_by "
//         . " LEFT JOIN ".$db->nameQuote('#__contact_details')." AS cd ON cd.user_id = a.create_by "
//         . " ORDER BY date_created DESC LIMIT " . $count;
//        $db->setQuery($query);
//        $rows = $db->loadObjectList();
//        return $rows;
//    }


}
